﻿using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;

public partial class basecon_import : System.Web.UI.UserControl
{
    protected void Page_Load(object sender, EventArgs e)
    {

    }

    public string FunctionName
    {
        get
        {
            if (this.hidFunction.Value == "")
            {
                string fn="AjaxFileUpload"+Params.MyRandom.Next().ToString();
                this.hidFunction.Value=fn;
                return fn;
            }
            return this.hidFunction.Value;
        }
    }

    public string ImportType
    {
        set
        {
            this.hidImportType.Value = value;
            switch (value)
            {
                case LwUser.TeamType:
                    this.labText.Text = this.hlImport.Text = "导入团队信息";
                    this.hlTemplage.NavigateUrl = Params.RootHttp + "download.aspx/team.xls?fp="+Server.UrlEncode(Params.FilesFolderPath+@"template\team.xls");
                    break;
                case LwUser.DoctorType:
                    this.labText.Text = this.hlImport.Text = "导入导师信息";
                    this.hlTemplage.NavigateUrl = Params.RootHttp + "download.aspx/doctor.xls?fp=" + Server.UrlEncode(Params.FilesFolderPath + @"template\doctor.xls");
                    break;
                case LwUser.StudentType:
                    this.labText.Text = this.hlImport.Text = "导入学生信息";
                    this.hlTemplage.NavigateUrl = Params.RootHttp + "download.aspx/student.xls?fp=" + Server.UrlEncode(Params.FilesFolderPath + @"template\student.xls");
                    break;
                case Category.CategoryStr:
                    this.labText.Text = this.hlImport.Text = "导入导师类型信息";
                    this.hlTemplage.NavigateUrl = Params.RootHttp + "download.aspx/category.xls?fp=" + Server.UrlEncode(Params.FilesFolderPath + @"template\category.xls");
                    break;
                default:
                    break;
            }
        }
        get
        {
            return this.hidImportType.Value;
        }
    }
}
